<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;

        }
                .footer {
            width: 100vw;
            position: fixed;
            bottom: 0;
        }

        .footer ul {
            list-style: none;
            margin: 0;
            padding: 10px;
            background-color: #ccc;
            display: flex;
            justify-content: space-evenly;
            align-items: center;
        }
        a{
            text-decoration: none;
        }
        iframe{
            width: 99vw;
            height: 100vh;
        }
    </style>
</head>
<body>
    <iframe src="./index.html" frameborder="0"></iframe>
    <div class="footer">
        <ul>
            <li onclick="ln(0)">主页</li>
            <li onclick="ln(1)">列表</li>
            <li onclick="ln(2)">购物车</li>
            <li onclick="ln(3)">订单</li>
        </ul>
    </div>
    <script>
        var arr = ['./index.html','./index.html','./index.html','\./dingD.html']
        var li = document.querySelectorAll('.footer ul li');
        function ln(index) {
            document.querySelector('iframe').src = arr[index]
        }
    </script>
</body>
</html>